package 输出和输入;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

public class readLine用法 {
    public static void main(String[] args) {
        BufferedReader bReader=null;
        FileReader fr=null;
        try {
            fr=new FileReader("f:/呵呵呵.txt");
            bReader =new BufferedReader(fr);
            String Line=null;
            while((Line=bReader.readLine())!=null){
                System.out.println(Line);
            }
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }finally {
            if (fr!=null){
                try {
                    fr.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
                if (bReader!=null){
                    try {
                        bReader.close();
                    } catch (IOException e) {
                        e.printStackTrace();
                    }
                }
            }
        }

    }
}
